package HomeWork;

public class Demo {
    public static void main(String[] args) {
        String[] a ={"Hello","heLLo","HEllO","hELlO","abc","def","ghi"};
        int n=0;
        for(String s : a){
            if("hello".equalsIgnoreCase(s)){
                n++;
            }
        }
        System.out.println("有"+n+"个包含hello的字符串");
    }
}

interface itf{
    public String doTest(Object o);
}
class Demo2 implements itf{
    public String doTest(Object o){
        return o.toString();
    }

    public static void main(String[] args) {
        itf test = new Demo2();
        System.out.println(test.doTest("hello world"));
    }
}

class Demo3{
    public static void main(String[] args) {
        StringBuffer sb=new StringBuffer("abcdefg");
        sb.reverse();
        System.out.println(sb);
    }
}


